<template>
  <div>
    <LazyLoadTab v-model="activeName" :tabMenus="menus"> </LazyLoadTab>
    <div
      :style="{
        position: 'relative',
        left: 0,
        bottom: 0,
        right: 0,
        zIndex: 0,
        borderTop: '1px solid #e9e9e9',
        padding: '10px 20px',
        background: '#fff',
        textAlign: 'right'
      }"
    >
      <!-- <template slot="controls">
        <el-button size="small" type="primary"  @click="Handle">录入首保索赔发票</el-button>

      </template> -->
      <AjaxButton v-if="type !== 'show'" :click="Handle" type="primary">录入保养索赔发票</AjaxButton>
      <Drawer :visible.sync="visible" :title="录入保养索赔发票" :width="920" destroyOnClose :containerStyle="{ height: 'calc(100% - 60px)', overflow: 'auto', paddingBottom: '60px' }">
        <ReportModal :rowData="tableData" @close="closeHandler" />
      </Drawer>
    </div>
    <!-- <Drawer :visible.sync="visible" :title="录入保养索赔发票" :width="920" destroyOnClose :containerStyle="{ height: 'calc(100% - 60px)', overflow: 'auto', paddingBottom: '60px' }">
      <ReportModal  :rowData="tableData" @close="closeHandler" />
    </Drawer> -->
  </div>
</template>

<script>
import ReportModal from './reportModal';
import { mapState } from 'vuex';
export default {
  name: 'achieveSchedulePanel',
  components: {
    ReportModal
  },
  data() {
    return {
      activeName: '营业报表',
      visible: false,
      // tableData:{},
      menus: [
        {
          title: '营业报表',
          path: 'repair/queryStatistics/incomeStatistics/businessOrder/index'
        },
        {
          title: '营业报表(历史)',
          path: 'repair/queryStatistics/incomeStatistics/businessOrderOld/index'
        },
        {
          title: '业务统计',
          path: 'repair/queryStatistics/incomeStatistics/businessStatistics/index'
        },
        {
          title: '业务统计(历史)',
          path: 'repair/queryStatistics/incomeStatistics/businessStatisticsOld/index'
        },
        {
          title: '服务范围汇总',
          path: 'repair/queryStatistics/incomeStatistics/serviceRangeSummary/index'
        },
        {
          title: '生产统计',
          path: 'repair/queryStatistics/incomeStatistics/productionStatistics/index'
        },
        {
          title: '服务顾问业绩统计',
          path: 'repair/queryStatistics/incomeStatistics/serviceAdviserAchievement/index'
        },
        {
          title: '收入汇总',
          path: 'repair/queryStatistics/incomeStatistics/incomeSummary/index'
        },
        {
          title: '在厂车日动态',
          path: 'repair/queryStatistics/incomeStatistics/factoryCarDailyDynamics/index'
        }
      ]
    };
  },
  methods: {
    Handle() {
      this.visible = true;
    },
    closeHandler(val, type) {
      // 关闭
      this.visible = val;
      if (type === 'refresh') {
        // 重新加载
        this.fetchParams = { ...this.fetchParams };
      }
    }
  }
};
</script>
<style lang="less" scoped></style>
